/**
 * @Auto generation code
 * User Controller
 */
import request from '../common/request/request.js'

/**
 * 
 * path, params, body, loading
 * 用户VIP升级 - POST
 */
export const beVip = async ({// query params
		code ,   // code ,必填 
		type   // type ,必填 
	
}, loading) => {
	return await request.post('/customer/beVip', {
		 code,  type, 
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 校验用户的token是否合法 - GET
 */
export const checkCustomTokenValid = async (loading) => {
	return await request.get('/customer/token_valid', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 校验用户的token是否合法 - POST
 */
export const checkCustomTokenValid = async (loading) => {
	return await request.post('/customer/token_valid', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取用户的详情，根据token获取用户ID，不需要传输 - GET
 */
export const getCustomDetail = async (loading) => {
	return await request.get('/customer/user', {
		
	}, loading)
}


 console.log('存在put方法，未兼容/customer/user，后端需要更正');
/**
 * 
 * path, params, loading
 * 获取用户余额 - GET
 */
export const getCustomBalance = async (loading) => {
	return await request.get('/customer/user/balance', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 用户个人中心接口 - GET
 */
export const getCustomCenter = async (loading) => {
	return await request.get('/customer/user/center', {
		
	}, loading)
}


 console.log('存在put方法，未兼容/customer/user/ch_pass，后端需要更正');
/**
 * 
 * path, params, loading
 * 修改用户手机号时，验证旧手机号操作 - GET
 */
export const checkOldPhone = async ({// query params
		t  = param.default  
	
}, loading) => {
	return await request.get('/customer/user/check_phone', {
		 t, 
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 用户投诉建议 - POST
 */
export const writeComplaint = async (loading) => {
	return await request.post('/customer/user/complaint', {
		
	}, {
		
	}, loading)
}


 console.log('存在put方法，未兼容/customer/user/update_phone，后端需要更正');
/**
 * 
 * path, params, loading
 * 服务人员token是否合法 - GET
 */
export const checkServiceTokenValid = async (loading) => {
	return await request.get('/service/token_valid', {
		
	}, loading)
}


/**
 * 
 * path, params, body, loading
 * 服务人员token是否合法 - POST
 */
export const checkServiceTokenValid = async (loading) => {
	return await request.post('/service/token_valid', {
		
	}, {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 获取服务人员详情 - GET
 */
export const getServiceDetail = async (loading) => {
	return await request.get('/service/user', {
		
	}, loading)
}


 console.log('存在put方法，未兼容/service/user，后端需要更正');
/**
 * 
 * path, params, loading
 * 服务人员中心 - GET
 */
export const getServiceCenter = async (loading) => {
	return await request.get('/service/user/center', {
		
	}, loading)
}


/**
 * 
 * path, params, loading
 * 服务人员证书列表 - GET
 */
export const viewCertificationList = async (loading) => {
	return await request.get('/service/user/cert', {
		
	}, loading)
}


 console.log('存在put方法，未兼容/service/user/ch_pass，后端需要更正');
/**
 * 
 * path, params, loading
 * checkServiceOldPhone - GET
 */
export const checkServiceOldPhone = async ({// query params
		t  = param.default  
	
}, loading) => {
	return await request.get('/service/user/check_phone', {
		 t, 
	}, loading)
}


 console.log('存在put方法，未兼容/service/user/update_phone，后端需要更正');